package com.project.bean;

import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.List;

/**
 * 商品实体类
 */
public class GoodsBean {
    /**商品id(pk_goodsId)*/
    private int id;
    /**商品名称(g_name)*/
    private String name;
    /**商品类型(g_type)*/
    private String type;
    /**制作方法(g_createBy)*/
    private String createBy;
    /**适用规格(g_suitable)*/
    private String suitable;
    /**包装规格（重量g_weight）*/
    private String weight;
    /**功效(g_effect)*/
    private String effect;
    /**库存数量*/
    private int stockNum;
    /**产地(g_address)*/
    private String address;
    /**生产日期(g_createDate)*/
    private LocalDate createDate;
    /**商品过期状态(g_state)*/
    private String state;
    /**商品是否下架*/
    private String offState = "上架";
    /**商品保质期(g_save)*/
    private int save;
    /**商品价格(g_price)*/
    private int price;
    /**商品图片(g_img)*/
    private String img;
    /**商品评价平均分*/
    private Double score;
    /**门店实体类*/
    private StoreBean store;
    /**评价集合*/
    private List<ReviewBean> list;


    public GoodsBean() {
    }

//    public GoodsBean(String name, String type, String createBy, String suitable, String weight, String effect, int stockNum, String address, LocalDate createDate, String state, String offState, int save, int price, String img, int storeId) {
//        this.name = name;
//        this.type = type;
//        this.createBy = createBy;
//        this.suitable = suitable;
//        this.weight = weight;
//        this.effect = effect;
//        this.stockNum = stockNum;
//        this.address = address;
//        this.createDate = createDate;
//        this.state = state;
//        this.offState = offState;
//        this.save = save;
//        this.price = price;
//        this.img = img;
//        this.store = new StoreBean();
//        this.store.setId(storeId);
//    }

    public Double getScore() {
        return score;
    }

    public void setScore(Double score) {
        this.score = score;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getSuitable() {
        return suitable;
    }

    public void setSuitable(String suitable) {
        this.suitable = suitable;
    }

    public String getWeight() {
        return weight;
    }

    public void setWeight(String weight) {
        this.weight = weight;
    }

    public String getEffect() {
        return effect;
    }

    public void setEffect(String effect) {
        this.effect = effect;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public LocalDate getCreateDate() {
        return createDate;
    }

    public void setCreateDate(LocalDate createDate) {
        this.createDate = createDate;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {

        this.state = state;
    }

    public String getOffState() {
        return offState;
    }

    public void setOffState(String offState) {
        this.offState = offState;
    }

    public int getSave() {
        return save;
    }

    public void setSave(int save) {
        this.save = save;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public StoreBean getStore() {
        return store;
    }

    public void setStore(StoreBean store) {
        this.store = store;
    }

    public List<ReviewBean> getList() {
        return list;
    }

    public void setList(List<ReviewBean> list) {
        this.list = list;
    }

    public int getStockNum() {
        return stockNum;
    }

    public void setStockNum(int stockNum) {
        this.stockNum = stockNum;
    }

    @Override
    public String toString() {
        return "GoodsBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", type='" + type + '\'' +
                ", createBy='" + createBy + '\'' +
                ", suitable='" + suitable + '\'' +
                ", weight='" + weight + '\'' +
                ", effect='" + effect + '\'' +
                ", stockNum=" + stockNum +
                ", address='" + address + '\'' +
                ", createDate=" + createDate +
                ", state='" + state + '\'' +
                ", offState='" + offState + '\'' +
                ", save=" + save +
                ", price=" + price +
                ", img='" + img + '\'' +
                ", score=" + score +
                ", store=" + store +
                ", list=" + list +
                '}'+"\n";
    }
}
